#!/usr/bin/python

import socket
import time

sockin = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)

def send(str):
    sockin.sendto(str, (('127.0.0.1', 8080)))

def recv():
    msg, (addr,port) = sockin.recvform(100)
    return msg


if __name__ == "__main__":
    for i in range(10):
        # send("test")
        send("sin")
        time.sleep(0.3)
        send("cos")
        time.sleep(0.3)
